Some optimizing of Item code