added Model and pubsub pattern for binding UIs