Construction and composition of rooted trees via descent functions