Translation and small refactoring