Move some code around to open opportunity for more shuffle matching