Cleanup method, to be integrated.