Refactor the Translator class