Cleaned up code and removed commented lines