Move worker and parse_files_inline to be separate functions