Refactoring of location and search directives throughout app