Changed the way dialog determines root item to a more reliable and explicit fashion, which fixed a bug with multiple dialogs. Also added text to input fields