Moved position of JS tags

Cleaned up the head tag and moved the javascript calls to the bottom of
the page