Quick clean up of some of the code, and additional comments for clarification and ownership