Proofgenerator refactoring