refactor factoid handling into its own file, was getting unwieldly