Refactoring the code, extracting TileSystem