Moved some server code about, improved HTTP server

The HTTP server now doesn't only serve a couple pre-defined files,
which I guess could potentially be bad but whatever.