Next-generation Cosmic Microwave Background (CMB) surveys will measure the anisotropies of the CMB with unprecedented precision. In this talk, I will discuss some techniques for leveraging this data as effectively as possible. Delensing of the CMB will be increasingly valuable when applied to future CMB surveys. I will present several applications of delensing, focused on the particular science case of testing theories of early-universe inflation. In some cases we find that delensing can recover almost all of the constraining power contained in unlensed spectra. Furthermore, I will present candl, a newly released Python package in which we have implemented an automatically differentiable likelihood for analysing both primary CMB and lensing power spectrum measurements. We demonstrate some benefits of a differentiable likelihood through a series of example calculations, highlighting topics ranging from Fisher forecasting to MCMC sampling.