remove dead code and improve minimized panel icon use