Refactored plugin model