Moved most of the things to threads and UI is updated using handlers