Implemented smart edit button.