move more functions around within the nxctmctree project