Moved query history functionality out of the BasicQuery class and into a separate class in the new queries package. Updated unit tests for better cover the queries package classes.