Refactor plugin code to just reinstall everything