Tried to add core loop functionality. Currently lags the game, need sleep function.