implemented basic event handling system. Made phase UI element reponsd to phase change events