Dispatch from command-line arguments to functions