Implement a statistics HTTP server

Noted and fixed. I'll go over the rest of the code with a finer-toothed comb and update other instances of this.