Fixed how we handle nested tags and added more tests.