History pagination 841124

supersedes #885 with a rebase