Removed memory allocations from game loop function to minimize trash collector