Added distributed event support and game loop stuff