Added headless support.