Refractoring Part 1: The Comments

Starting work on refractoring, so I added a few comments around the
code, so it's easier to see what we're doing.

Also cleaned up imports, deprecated any unused methods, and removed
some optional compile warnings.