Fixed bug that caused null pointer exception when displaying keyword hits.  Other minor refactoring
refactoring of keyword search markup classes