cleaned up code, corrected stuff
cleaned up code & corrected errors