Simplified logic around setting sourceInfo.
Fixed typo in TODO.