implemented freetext search and refactored for dynamic swithching between the dev (HWU) and beta (EBI) APIs