Simplify getDeviceType()
Rewrite unit tests for getDeviceType()