Real contour working. Must still fix some comments and stuff.