Work on building a tree on the PHP side