small changes"
cleaned up some code to comply with jslint.