Enhance code documentation and add TODOs