Refactor and keep the text box focused.