Grid is almost working now, need to find why Y is being reset