You could make `success` and `error` function expressions instead of vars.