Cleans up code

Adds documentation, removes unused imports, etc...
kpmartin