Device class, factory, and exceptions