Added Matlab port, added further formatting changes, new headers.