Refactor SetInput and TryGetItem.
Code cleanup.