Updated to use tile width and height.