Fix search plugin views
Refactor initialize valiables