Perform a better check for if the username to UUID conversion has completed.

Free up the query results when done extracting them.
Additional cleanup.