Move code for parsing a itsam item to a method would definitely with code readability.