clean up control panels, including computation and insertion of separators