Fixed some small bugs in PropertyPanel and CurvePanel.
Cleaned up the code.