Refactor tile and thumbnail view