Cleanup
Whitespace cleanup.
Updated documentation.
Moved helper functions to the bottom of the module.
Started converting to Dscanner coding style.