Did some basic simplification. Broken when try to simplify corners.