Fixed bug in fitEdge.  Stashed code incorporating Anthony's pre-existing linescan.  Will re-incorporate later