Better test coverage. Some bugfixes.

Also, we don't process useless blocks anymore. They're useless anyway.