Moved frame_init from thread.c to init.c