Improved `parseOptions` method.