Refactored plugin import