Changes to core.c