Refactor some armour code

This was sitting around in the shp branch, but there's no reason
it can't be merged in now.