Moved computation out of the Market Tile rectangle creation loop