some argument parsing cleanup
added new argument type: z (optional, any)