Moving functionality to clear adjacent tiles into its own function.