Comments, code cleanup, and #ifndef for headerers