Comment, refactor, reorganize.  First version