Changes that never got committed (for months, ow).

The current version of the code. I attempted to improve user filtering
when many users are filtered, and may have broken it.