Improvements to overlay plugin