Made some refinements to the UI and visit handling