Split some classes out

 * Made a FileGenerator base class for writing files