Change that event hack into proper observer pattern.