Enclose plugin in closure