Changed the way threads are created as well the import and diff helpers
to avoid race conditions and crashes.