Code Analysis cleanup
Refinements to simple sample program