Move javascript to a somewhat better place 

* Will look into angular.js or backbone.js soon