Refactor transifex.js lib