Wrap some long lines, move a func where it belongs
Improve error reporting when obtaining DB conn
Fixup DB test runner script