Added a more robust version of translator. Further work could be done on this.