Remove the second instance of using map when we don't need to.