refactored translator API. p1
API2
minor code improvments