Added TwKeyTest stuff (+ Context functions).
Hardcoded iteration and convergence threshold in sample.