Improve grid rendering