Translator refactoring, fix translator tests