Clean up options and arguments for commands