Improvements to ship statistics script.