cleaned up code a little

removed unnecessary code and cleaned up a little
added some notes to make ideas more clear