A little tidying and a faster (high memory) version of duplicate removal