Going through and debugging

Some problems with converting between lat, long, and i, j. Trying to
fix. Finding intersection with grid edge is a problem