Changes for issues #43, #44 and #45.
Samples updated.
Latest code and docs update.