Improved realtest.register_tree