Added "loading" dialog + minor fixes

Some minor stability fixes and added the "Loading" dialog so the user
will know what's going on