Cleaning up code and removing extra comments