add grunt, fix unit tests