Refactored Generate area