type <iterator> and minor improvements