WIP server.js overhaul