Add grunt, sass, uglify and karma. Break logic into separate files.