Rework command-line argument parsing