cleanup test helpers, add proof-of-concept for headless tests.