Added Karma test. Minor directive refactoring. Fixed CommentCommit directive bug. Grunt file refactoring.