Wrapping link and .sub-menu with wp_nav_menu

Ifigured it out myself, thanks to reading this: http://code.tutsplus.com/tutorials/understanding-the-walker-class–wp-25401

I created a custom walker:

class Child_Wrap extends Walker_Nav_Menu
{
    function end_el(&$output, $item, $depth)
    {
        $indent = str_repeat("\t", $depth);
        $output .= "$indent</div></li>\n";
    }
}

And used wp_nav_menu:

function main_nav() {
wp_nav_menu(array(
    'before' => '<div class="child-wrap">',       // before the menu
    'walker' => new Child_Wrap 
));
}