Quick fix to allow compilation

Still not finished, but working on reordering elements from root.