Minor example refactoring. Add comments