Modularize range component variables.
Modularize switch component variables.
Removed unused variabled on range component.