Added maxiters and maxtrees params to avoid crashes on large file sets.