Reordering core.cc functions to match core.h