Refactoring: tiles now create Tile object, moving some function and implement deselect on map click with some conditions