remove unused headers
rule out template specializations for outer classes
another simple pass --remove-unused-outer-class

remove a outer class if this class
  * doesn't describe a template, and;
  * is not a template specialization, and;
  * doesn't have any base classes, and
  * is not referenced