straighten out nesting in theme files, document div closings better