made a sun object, add functions to planet and cleaned up the code a bit