Refactoring and simplifying server.
Updating docs.