J.W. improved parse-htlm code readablitly