Changed pagination(). Changed jQuery ajax function. Some other changes