added proper js layout
fixed buildfile and added jshint