Working on the tile map formulas