added .val() accessor for rows.
split out edit sections into a template partial, edit.html.