Do not use a stack but explicitly remove an closing tag

- We now use [].remove to remove the appropriate closing tag