Refactored insertChildData to work with PDO object.
Small changes in files.