Separate out (most) code that runs after forking
Simplify terminal creation
Use tornado ioloop instead of custom loop
Simplify some communication code
Clean up terminal killing code