Move dependency management into application.js. Fix error in how router reads the request body from the request stream.