Tool is modified for better perfomance and memory usage.