Closed #47: wow what an awful bug, server.js has become far too messy,
should be optimized soon.