Error handling now done via exceptions. Should probably send 404s for invalid threads.
More error handling