Implemented detach_child, removed unused functions reduce_to_readonly and reduce_to_nothing.