Updated register device function
Updated devices test