Refactoring and testing my battleship code from phase 1