Refactor hidraw backend and devices