Moving some code to base integration plugin