Refactor to make the let expression's scope smaller.