Reformat and add // TODO:

Reformated to align { and } with verbs.
Added some // TODO: comments here and there to indicate some
refactoring opportunities.