improve plugin base architecture