fix indent and remove unnecessary wrapper

The closure is unnecessary since you directly add a member to the `window` object.