Break factories into separate files