Final sorted version for cleanup