Improve upon this basic example with threading, and a better layout.