Improved argument parsing.