Handle nested items.

* Use a stack to keep track of the current context. When a nested item needs to be parsed, push the current context onto the stack. When the nested item completes parsing, add the item's context to the parent. Pop.

fixes #26
Merge pull request #27 from shane-tomlinson/issue_26-nested_elements

Handle nested items.