Added some javascript to work father-child relations. Works partially