Added the buildup and teardown functions to plugins