Further reduce code redundancy in bindings.