code clean up + dialogs created