Changed keys from raw int to templated class