Consolidated code.