update sample for new SDK constructor

Also, enhance comments