Changed nesting to be shallower