Implement All Devices (temporary workaround for now) and clean up JS code.