Work in progress to add layer api
Added grunt config file and fixed various syntax errors / warnings