minor optimizations and cleanup of device api views and device model