Some criteria for the Cohen-Macaulay property and local cohomology