refactored grunt task for karma. code is cleaner and more compact