Minor amendments.
Uncomment all printf debugs.
Simplify the example code.