Revert "code cleanup and comments"

This reverts commit af08d9779607cfc289798e1ba2ebdfd4ade670e3.