Improve location handling
Add grid helpers and ag tests