documentation on checking expected facts, some refactorings