Return interface type instead of implementation type.
Fix Sonar warnings.