Remove debug code
Add a check to make sure the world is not null