Fixed a few bugs, cleaned the code up and removed over 100 lines of un needed code