Improved nesting as per #34, Attached interdiff for same.