Large refactor of code including work done to utilize grunt.js utilities and squash dead code