Added pagination functionality

Created pagination methods to replicate will_paginate gem.