cleanup and more duplicate elimination logging