Implemented an indexOf() and a removeDuplicates()