"With" decorator. More tests. Code cleanup.