code refactoring; added testcases
added new options for pager
fixes #10