Refine code and comments

Removal of most blank lines and more specific commenting on functions
Remove TODO section