Extract exercise-specific code