Revised and refactored warmup exercise.