Added explicit declaration of generic function CHILD.
Reorganized files to reflect real dependencies.