Implemented memory allocation and population of direct children