Refactored some code and rewrote tests for sinking ships