Fixed some typographical bugs
Finalised adding changes for duplicates merging