Made possible THF proof generation. Still needs bugfixing, though.