simplified the type verbiage by enclosing everything in a topos class which genericizes it all