Replace kind string parameters with struct Kind parameter. Updated the Query functionality