Refactored plugin update