Refactoring codes initializing entry generators