Various search improvements (new rules implementations/tests and such).