Add Case class and pop methods to CBRclass