refactored to use karma with jasmine for tests

added common grunt tasks
other minor updates