further refactor cleanup