refactor compiler plugin