remove unused function
jshint fixes (missing semicolons etc)