Refactored some code on display page

Split up some of the C# code and HTML in the display page to add
readability.  Most of the loops for items like location and titles are
collected in a single variable, and that variable is used in the HTML
display