Implemented UI using ObservableObject

Put the ObservableObject class into practice by implementing it in the
UI. Also changed it to be abstract, since it should never really be
instantiated on its own.