Refactor. Bye Matrix
Merge. Minor error in Main