Refactored the code for the Ship Menu.