remove debugging; fix device parsing