cleanup in bezier code