Rewrite parse-options, added unit testing for it, etc.