Cleaned up code and deleted some comments