Purchase pages

Basics of a table output algorithm!!