LevelToElem fix
tree building almost done