Refactored options checking.