Changed detectStructure to accept a StringGrid instead of string parameters