Obtain M_PI by defining _USE_MATH_DEFINES
Add missing includes
Add missing "typename" keyword to dependent types
Reuse base class "what" function