Refactor. Add plugins