Carbon and nitrogen cycling in sediments