Implemented CreateUninitializedItem and refactored code