T quickfix fix

The first commit contains just refactorings, the second one the bug fix. The latter commit also contains an detailed description on what went wrong - a problem with parallel collections. I read about that some time ago on scala internals but can't remember too much details.