simplify parseStructure function a bit
Merge pull request #3 from michaelficarra/patch-1

Simplify parseStructure function a bit.