Refactoring, read from file