some cleanup based on tests