added hotkey to change weight of control point and to toggle the visibility of the control points; tidied the code