Better handling of states and dialogs
Merge remote-tracking branch 'origin/master'