Use a generic dictionary rather than hashtable