update gitignore
remove uneeded imports, support headless env.
remove obsolete files