added register device and refactored notification routing