search plugin slign refactoring and code cleanup