Added tests for adding and getting nested tags
Updated tests to assert correct values when nested tags where involved
Fixed up main code to behave correctly when dealing with nested tags