New and improved contour code debugged