Cleaned up code and rolled back changes