adds batch cleaning, closes #2