removed some duplicated code among registerDevices() and start()