Clean up usage of doubles in query_spec