Clean up tests, code, and allow custom presence predicates in environment.