Refact the code into better packages.
Add matrix combine method.