Revmaped whole bind implementation.

Previous implementation incorreclty uses incorrect expression in
delctype in case of unused functions with caused compilation error
in clang. Rewerite implementation to avoid such problems.