Sections of search.jsp have been factored out in order to make maintenance easier. White space, comments and unused (commented-out) code have been reduced.
Fixes #142.