Small refactorings

Signed-off-by: Clement Escoffier <clement.escoffier@gmail.com>
Remove scala method

Signed-off-by: Clement Escoffier <clement.escoffier@gmail.com>
Use charsets

Signed-off-by: Clement Escoffier <clement.escoffier@gmail.com>