Added const to several functions. Restructured transfer test.
Implemented test of transferMatrix