Code refactoring (QRinput_Struct_count has been added).