Convert makeParser & findImport into public function.