Bezier function cleanup