Added commits and cleaned up the code