Fix return type
Add explicit return types to public API