Consolidated common code