refactoring in 'commons'
Added multithreading version for greedy coding matrix finding