Merge branch `rewrite` into `master`.
Fix learner behavior.

Update accept counts properly.
Fixing joins.