Rather than make options a global, we should follow the usage elsewhere and pass it as a parameter. (See generate_output immediately above).