some fixes and more cleanup to match html5 standards