Creates merge funcationality for tiles