arrange plugins and refactoring