Added confidence and iterator functionality

Hello Greg,

I added some extra functions to this library with. I hope you have some time to take a look and let me know what you think.