Added edit button event.
Included the edit state and controller.
Added the edit state and controller.