Duplicate bind code refactored