Improve plugin structure