Initial attempt to fill the matrix
Fix the constructors to actually work

And not just produce memory leaks.
Finish filling the matrix
Apply a hack to avoid array index overflow
Merge pull request #2 from mitya57/master

Filling the matrix and constructors fix