Improvements to random spawning. And other stuff