Refactoring the code, tests and comments are up to date

I made a ComplexArray class to ease up the work that
raw std::complex<double>* arrays caused.

Some functions were cleaned out from the algorithms namespace
to their own utils namespace.