Added a autoscaling grid and centring in map.
TODO: Fix the bug with snapping with grid.