Multiple Bugfixes in all core-classes. DON'T USE THE PERSISTENCE FUNCTIONS!!!! NOT FINISHED BUT COMPILEABLE