Cleaned out page iterator class

Hi Peter, it's been awhile since i wrote this, and recently, taking a look at the code again I found out a cleaner way to do some of the things and take advantage of ruby. Please take a look when you get the chance.