Working pagination routines. Pagination added to filemenu.