Issue 279: refactor main view to use less memory

- no search term:  from 22MB to 0.9MB
- string search: from 22MB to 14MB
- entity search: from 22MB to 14MB
- strings & entity: from 22MB to 18MB

Also refactored some of the glossary view to use MVC