Several fixes to AOL and tests

_test_db_close cleans up for us IIRC