adding grunt and some initial optimizations