removed many jslint errors
fixed some more