Use a map rather than vector for the grid state

- Keys are [x y] coordinates, values are keyword pieces (or nil)
- Remove a couple unnecessary functions