fix startup logic
fix importer and add coverage
Various bug fixes