Implemented Paging class.
Cleaned up main class.