Added multiple page type functionality

Kind of a hackish way to make it work, but I think it works for what I was needing. Leaving this here if you wanted to take a look at it.