Improve code for translation module