Refactored ruby code. List2 contains closing tags for list.html.