Wholesale changes to how claims work

I have changed the claims tables to make them easier to understand. Am
in the process of renaming everything and making the claims logic work
again.