Fixed bug with reparenting device. Added method for getting triggers for device. Fixed bug with creating and updating triggers.  Added capability for sparse device tree.