Internalize dirty bits

This moves all the previously exposed, but not part of the public API bits to internal access. I wanted to use a namespace for external developer ease, but it turns out you can't put a user-defined namespace on a class definition, only on class members.