move initialization logic into main
do not hardcode api urls

instead, fetch them from the root url of the api
search by converting text to lower case