Pagination feature

Added pagination. It can be turned on/off. (default = off)