Refine command-line processing