Part 1: The console code.