Implemented observer pattern for UI