Minor refactoring
Fixed a planet disappearing bug