refs #88: Code cleanup
refs #88: Better performance and fixed a small bug.
refs #88: Updated the tests and added a new one.
res #88: Better handling of nesting lists.
refs #88: Update note.
refs #88: Added a comment.
refs #88: Code cleanup
Merge pull request #88 from CenterForOpenScience/issue_88

Subsequent nested lists are do not nest correctly