Making MatDict typedef safe

STL maps can be dangerous when the keys are pointers. Pointer to string is not what was intended here, so we're changing to std::string. Also modifying this to be an unordered_map as we don't actually care about the order.