Add loading bar and multithreading to update gui while scheduler is running