Performance improvements to make UI more responsive. Move UI blocking calls to async.