Eliminate slow dependencies on SQLAlchemy, update tests