Rewrite the universe handling code to be a bit more sensible