Fixes for paging problems, added storage for history so page re-entries continue from last place (using session variables)