Add pagination controls, and option to put pagination controls at the top