Modification of add and remove functions.
Implementation of OrderedSet collection.