cleaning up code and working on keeping it consistent with style guide