Function headings added, jshint directive moved from top.