Plugin option handling refactored