Better connection handling and UI improvement.