Code Cleanup & Comments

Misc code cleanup and comments.