Consolidate code.