Some code cleanup in matching.
Work on rfbucket generator.