Added tag ordering encapsulation parsing; still rough around the edges