worked on a more dynamic html head

This worked on taking out any bad hard coding when generating the head
of the html. Also only loads the top once and stores it in memory for
improved efficiency