GCE: factor out common code and strings