Rough draft of tax cost function complete.

It's going to need tweaking, but luckily it's only in one place now, I
don't have to worry about a ton of them.