Refactoring old binding code