Reorder tests to match manual section order
Use same db connection for all tests.
minor refactoring