LOTS OF BUG FIXES

Corrected syntax/spelling errors got code functional