Refactor some of the core WordPress functionality into a base class. Namespace all the things.