added some comments, const correctness
improved test cases, added ShipTest