Refactor plugin importing Closes #2