$max_length and $max_passes are now public variables.
Renamed $js_len to $min_length, since that's what it really is.