Fixed some bugs. Replace alert with dialogs.
Merge pull request #7 from lostcharlie/master

Fixed some bugs. Replace alert with dialogs.