I'm not sure what you mean with "restarted", but this shouldn't be difficult doing with the module editor.
Look at the documentation on how to make modules without coding, no need at all. Create a new module, drag a button and assign a keyword for the layer on/off on map1 and a keyword for the fx on/off in the map2. Picking them on UI is so easy.
You could do this for each layer or per selected one.
You could not map a midi note to two different controls directly, but doing a module that targets both is easy and then you could map a single note to that module button.
Hope it helps