fix a buncha closure issues
further closure improvements (I think... hope...)