Moved match type code.
Refactored for more common code between option sets.
Added handling of -- in arguments list.