refactored to ndarray
refactoring to matrix
and revamping docs
Merge branch 'refactor'
including fft