Added comments and simplified lookup_obj_parent