UI: split js ship into smaller modules

ship.js was previously getting too unweildy, splits logic
up among general functionality.

Tests have been updated