Fixing implementation of iterator, add and remove methods