Ported the corner and line detectors to the Mac. Fixed a glitch in the line detector.