Refactoring to make search combo a more angular-like directive