added commandline parsing (-n, --headless)