Added duplicate remover and commented code