rewrote curve editor. curves can now have negative y values.