Generation from file, config file example, some refactorings