move Knob implementations to cpp