Loan#state cannot be NULL

Also includes a grab-bag of other goodies.