More refactoring, preparation for even more refactoring and fixed localization