Use custom classes instead of stdclass for return types.