Added limit as a parameter to get paginated history.
Offloading more logic into the page manager.