Refactored code and added 2 tests

1 unit test for correct chard placement
1 ddt only for correct collapsing of rows
unrelated changes, problem with merging