Improve error handling around options parsing

This PR aims to improve the error handling around options parsing. We can improve this by throwing out warning messages when unknown options are encountered.

Not yet ready to merge but the first commit should fix issue #200.