Functionality for adding and deleting elements.