Some refactoring and hooked up grunt