Improve grid drawing