Improved command line parsing