Added user interface design and cleaned up code.