Add sorting for tiles