fix issues for express 4 update

change app.locals() functions to app.locals objects. note need to delete app.use() function