Fix dependencies; move main script code into app
Finally launches under grunt without any JS complaints