Bug fixes, clean up, and updated examples

Change-Id: Ieda6829c684fc1de9af848db47e5394f9486ec6c