fixed tests, clean-up for old attachment references