Broke translation/output file creation into separate functions