Headless testing

Minor improvements