Added pagination to controllers