Refactor Ship class.