Added comments for functions. Change params order in getChilds() function. Fixed $select_name variable name.