Adjusted according to changes in game core. Added a -main.