Latest fixes build
Tweaked source

went through jshint checks