factory config in application.properties

Shifted the configuration of the factories into application.properties.
Also refactored files into new packages.