Now "go test ./..." passes, it had broken due to the V5 transaction (NU5) changes in #392. I didn't have time to fix the tests at the time. Also, this fixes a few lint problems.