Remove unused old stuff.
Fix most of jshint warnings