Added support for headless systems in constructor