Remove unused code from p2 plugin