Fixed awful bug by renaming the length property of ships to shiplengths, so as not mess with JS/JSON/Session magic.
Merged with Charlie's code.