Renamed matchStructure to detectStructureAtLocation, made it public, and added a break statement in loop (forgot to do so)