Added func remove orphans