Re-wrote main.s