Minor fixes and improved example #2