Refactor to allow for Grunt based tests