This logic is now in two places.  I see that it isn't quite refactorable though.