Refactor factory methods into base Factory type for ease of testing.