Trying to add function to build prefix code during tree build.