Add server code and serious commenting