better iterator support
general cleanup