Improved edge detection and response. Clean and comment. AH108

Increased to warning level 4 for all projects.