Moved init inside core