Refactor to support only existing devices
Finalized some changes