got rid of x0,x1 so xmin/ymin is used everywhere.  added depth testing (finally)