Edits 4.1.4

Updated sample code for v4.1.

Please run and test this application for conformance with the accompanying documentation before merging.