reorganized signals and rules to separate modules