Use a map of handler functions for CLI main()

Function maps are a bit more tidy than if/else blocks for directing an
action to the appropriate handler, IMO.