Reorganize device tree