scala cleanup