Trim code