Renamed hasIndex to has
Added some todos
Unified map and unordered_map, shortened code by using inheritance for default toObj