WIP ReadMatrix file port.
More Algorithm refactoring. WIP