Analysis updates

Mostly tiny changes to bring logic into step with actual data.