refactoring, creating new classes for reading configuration, reading words and writing output file