Added a nice comment to explain the line splitting.
Re-arrange imports, added some comments, general cleaning.
Added region headers, to help visually separate elements
of the template.