refactor line drawing to make it more obvious
add doctype declaration