Example cleanup and bugfix.