Reformatted user interface structure.

Much better seperation of program functions.