small code and dialog improvements