remove obsolete modules
refactor ToggleValues and TargetEndStates