Refactored ordered map identity hashing into utility class and implemented better set implementation without relying on an ordered map