Refactor generation methods