Made query API a bit better for now.