basic game loop, cleaned up some mash issues