Made stuff better.
Updated map.grid to be an ndarray for speed considerations.
A few optimizations, I think.