Streamlines database connection, tests pass