Command-line flag parsing