Refactored.
Added test for option with no argument.