refactored server.js and moved partials