refactor processing files to templar.api