Now passing basic tests that match up with matlab.