Replaced term "title" with more accurate term "heading" in many places.
Moved the startup and heading management code out of script.js