Implemented grid rendering.