tidy up and a switch to use the global settings