Cleaned up some code and removed some unneeded comments