Cleaned some code, whitespace, and comments