Move classes to separate files, trying to refactor ImageFactory