Minor refactoring in rexpro.  Extract a few methods.