Add sample and refactor plugin