abstracted out some matrix manipulation into AbstractMatrixHelper
added EOL normalization
updated the copyright notice to 2013