Make factoid repository optional
Bug fixes