Since you're cleaning up this code, could you make this a single `var` statement with comma-separated declarations?

Same for Error Codes below.