Major changes to the core-functions

See the readme-file for details