Added tile calculations.