Added uglify, refactored build to avoid code repetition
Added karma test step to run unit tests
Added istanbul coverage