Tidying up code to get jshint to pass again
Updated modules from old requirejs format to common-js with amdefine format.
Code-consistency sweep
Updated packages to latest versions