Move custom rf class outside the combsimp definition

TODO
- [x] fix tests

This fixes, or rather, works around, a bizarre caching issue involving classes
defined inside functions.  See the discussion on pull request #1710.