Refactored to match others
Fixed plugin wrapper