Add text tests, fix an event teardown bug.