Front page JS: awareness of environment and clean unused settings.