Clean up argument parsing with match