Some refactoring and preparing grunt