--type option and better option parsing