Add edit_mode feature. Update edit_link to use it.