Added: Source cleanup function.