Extract binding setup to separate function.