Implemented i18n + did some refactoring.