Not thrilled about this query_get_versions method. It would probably be better to somehow merge it into query, but I'm not familiar enough with Python to come up with the proper way to do this. I'll look into into more later.