Some tweaks and added a sample of user-defined iterator