Removed dependancy on unordered_map(s). Using simple hash function