Recent advances in the application of total scattering methods to functional materials