Made wholesale changes to the UI.

the beginnings of abstracting the non ui parts