added even more comments and cleaned up code