I get why you're doing this, so that the final call is identical.  But it's super strange that `position` is getting set to a function here.  Also, anonymous functions, bleh.

What if you set a `function wrapper(er, written)` at the top, and then here, you can do `position = wrapper; wrapper = undefined;` or something?