% Leave project in current folder
function leave(d)
    if ~exist('d', 'var') || isempty(d)
        d = pwd;
    end

    sp = mpm.subpaths(d);
    for i = 1:length(sp)
        rmpath(fullfile(pwd, sp{i}));
    end
end
