Fixed up invalid HTML (and improved code nesting to boot).
Updated to Rails 3.2.12.