Basic text appending working for console and message mode.
Clean up event handling. Fix context initialization loop on window resize.