Updated bind and setup to use common code