Documentation and tweak to run_server()

Added docstrings for all functions.
Moved try / except clauses into run_server so that it becomes a
purely blocking call.