Added pagination for devices.