use request instead of session in search and tags. refactored controllers