refactored tile class
refactored and rearranged dialogs