refactor plugin package