Elementary theory of structures