Added edit functionality.