Fix a warning, a bug that goes w/ the test added for db in
a985de09d008235b33a1aff8b703e4d2bc2745e2, and some word wrap.
Move couple tests from java to scala, w/ other minor improvements.