Moved if statement into method.
Added app icon to dialogs.