Fixed IO functionality of test file.  Finished majority of Matlab script