Refactored drawGrid function