Improved command line processing