Added code for programming new switches, and the study