Unit tests for the parts of device manager that should be working, and some effort at fixing compile errors in other modules