Broke out functionality from device.js and removed it.