Remove unnecessary error types
Fix function name