Added getPrevious and hasPrevious methods to paginate interface
Reorganised structure