Well formed now mostly works with tags. Still some bugs.