Completed Model-View-Controller and Publisher-Subscriber implementation