Split the HUGE generate method into different methods.