Adding doctype
Tweaks and code review