Refactory whoisQuery to return error.
Added timeout.
Added tests.