Refactor app.js to get rid of redundant resolvers