Refactor bindings framework