Changed the way tree branches/leaves are represented (through the parent ID rather than the path)