General commenting and cleaning up code