Clean way of showing/hiding the computing progressbar and fire the appropriate callbacks.

Unfortunately, the progressbar does not yet have time to update properly. We need to put more timeouts in the computation loop.