Refactor planet-class