changed connection structures + added part of the mapping API. Only rewiring remains to be added.