Updated extract-mid-triplets to take advantage of 'let' form.