Adding edit and add functionality.