Cleaned up the log in and did some query measurement.