Use the already calculated grid when done. Fix some formatting issues.