move excluded prefix and length out of key for device_prefix