updates to sampleapp and UIlib w.r.t SDK v4.1