Fix startup error with null worlds, more code cleanup