Refactor plugin install