Moves the reflect code into Reflect and VersionReflect classes, in order to make the reflect code more modular and DRY, I've made it harder to read, I'm not sure it's a net gain.
fixes the tests so they all pass, and adds a new check to make sure enpoint public checking works