Refactor threading and move it to fetcher