Many small bugfixes
Updated core