Add enter and leave methods to plugins and allow the use of variables in all methods