Added logic to turn edit mode off and on with title change on button