Refactored build_grid_from_file.

Used the idea from my last commit to remove mutable state from build_grid_from_file.
Exciting!!