Complete rewrite and using angularjs now