Refactoring, extracted file reading to separate class