Refactor code into general manga downloader