Refactoring cram plugin