restructure init and lifecycle of DeviceInRangeService