Fix for empty search codes, translations + refactoring