JS fixes. Missing bodyparser().
Additional shimming for JS
Refactoring for gradle build. Build distribution