Added CUDCallbacks tests, fixed lib to make them pass