Refactor of localization service and preparation for Karma