Cleanup of sources structure.