cleaned up server.js to comply better with JSLint