Refactor fact gathering