Tidying up resources.