Fix #3
Fix #4
Fix #5
Fix #6
Fix #7
Showing and updating dialog works