Minor fixes for pointer-based iterators, other small fixes