Finish off AIs 7 and 8, which were basically two sides of the same coin

Signed-off-by: Tom Haynes <loghyr@primarydata.com>