Clean up document edit form, including chapter entry.