Added on/off switch for code creation