Changed Enumeration to use templates instead of std::function.