Changed asyncs to threads, added progress dialog