Factorize and clean the control panel