Refactored server.js

Looks quite messy, anyways. :/
fixings
fixings