Fixed entire data access layer.