Fixed readMatrix routine so that the file is only opened once. Made some shortcut routines for printing and reading