   persistHighScoreTable(false);
 }
 
-void createStarFieldVals() {
-  for (byte i = 0; i < NUM_STARS; i++) {
-      setStarValuesForIndex(i);
-  } 
-}
-
-void resetEnemies() {
-  for (byte i = 0; i < MAX_ENEMIES; i++) {
-    enemies[i].health = 0; 
-    enemies[i].bullets[0].hide();
-  }
-}
-
-void resetBoss() {
-  boss.health = 0;
-  boss.dying = 0;
-  for (byte i = 0; i < MAX_BOSS_BULLETS; i++) {
-    boss.bullets[i].hide();
-  }
-}
-
-void resetPlayerBullets() {
-  for (byte i = 0; i < MAX_PLAYER_BULLETS; i++) {
-    playerBullets[i].hide();
-  }
-}
-
-void setStarValuesForIndex(byte i) {
-  starX[i] = random(250);
-  starY[i] = random(11, 64);
-  starWidth[i] = random(1, 4);  
-
-  if (starWidth[i] >= 3) {
-    starSpeed[i] = random(30, 40) * 0.01f;
-  }
-  else if (starWidth[i] >= 2) {
-    starSpeed[i] = random(18, 25) * 0.01f;
-  }
-  else {
-    starSpeed[i] = random(7, 12) * 0.01f;
-  }
-}
-
-void updateStarFieldVals() {
-  for (byte i = 0; i < NUM_STARS; i++) {
-    if (starX[i] < -1) {
-      setStarValuesForIndex(i);
-      starX[i] = 128 + random(20);
-      starY[i] = random(11, 64);
-    }   
-    else {
-      starX[i] -= starSpeed[i];
-    }
-  }
-}
-
 /*******************************************************************************
  * ENTRY POINTS                                                                *
  *******************************************************************************/
 
+// Runs once, initialization.
 void setup() {
   arduboy.beginNoLogo();
     

    isInitialTitleScreen = false;
  }

  byte selectedItem = TITLE_PLAY_GAME;
  unsigned long totalDelay = 0;
  long lastDebounceTime = millis();  // the last time the button was pressed
  byte shipTone = 100;
  float earthY = 56;
    
  for (float y = 64; y > 16; y -= 0.2f) {

    }
}

// Stop any music that is currently playing.
void stopMusic(){
  arduboy.tunes.stopScore();
}

// Determine whether to play A button shoot tone.
bool shouldPlayAButtonTone() {
  return (inGameAButtonLastPress > (inGameFrame - 20));
}

// Determine whether to play B button shoot tone.
bool shouldPlayBButtonTone() {
  return (inGameBButtonLastPress > (inGameFrame - 50));
}

/*******************************************************************************
 * UTILITY FUNCTIONS                                                           *
 *******************************************************************************/

// Redraw the screen.
void display() {
  arduboy.display();
}

// Display message at specified location in specified font size.
void printText(char *message, byte x, byte y, byte textSize) {
  arduboy.setCursor(x, y);
  arduboy.setTextSize(textSize);
  arduboy.print(message);
}

// Redraw the screen after a short delay.
void delayAndDisplay() {
  delay(250);
  display();
}

// Use a typewriter effect to display characters from the bitmap font.
void drawChrs(byte cPos, byte yPos, const uint8_t *letters, unsigned long delayTimer) {
  byte curs = cPos,
       strLen = pgm_read_byte(letters),
