Created CoreEngine.cpp file with stats calculating

Replace CoreEngine.cpp with this file to enable statistics.