Made updater in different thread, some code cleanup aswell.