Merge pull request #809 from brianmego/extract_print_help

Extracts print_help into its own function