Moved grid location calculations from search.js to new SearchGrid class (searchgrid.js).