Added copyright & license headers. Fixed some htmltidy warnings