Added API groundwork, fixed up some grunt stuff