Improved command argument handling