Improved argument parsing