removed global variables from extract_db(). ToS database parsed