Consolidate some stuff in new code.