Implement a statistics HTTP server

Fixed and added javadoc.