Added pagination with a simple ajax function.