Fixed minor style issues
Factored UI code out to its own module
Place the demo code into a module