Refactor device tree

It's quite a mess right now - this commit makes it a lot cleaner.

Change-Id: I0fe2d9994afe44207b267e60e237c9c997aa6e72