refactor; include 'template <>' information for classes as well