Re-implementation of starmap

First re-implementation of starmap. Several files have been updated.
The starmap as such is still under construction.