Change dialogue templates to have state modes in charge of the titlebar rendering
Allow dialogue state edit mode to change the state's name
Add a dialogue state close button
Dialogue state resetting