Factored out edit_modal scripts