Refactor code to make it ready for l20n format