working on v7 compatability

some changes in doctype format in v7 - partially changed here to start
some matching