Please have a look at this - I think you could solve your problem in a similar way, i.e. use distinct environments in which you define the different settings needed
Please have a look at this - I think you could solve your problem in a similar way, i.e. use distinct environments in which you define the different settings needed