Kate's pay calculator, with minor suggestions by Jim.