Fixing documentation and using separate args for error_code