improved ship move heuristic

rather than going after the 'closest ship' make an intelligent
decsion.
fixed a few defects
lotsa debug