Add more tests for edge cases.
Refactoring of sensitive environ filtering.