Moving some methods out of ShimUtil.