Timeout long compiles after 10 seconds (fixes #2)
Some trivial refactoring and documentation in the server code.